package peng.bean;

import peng.util.Base64;
import peng.util.DES;
import peng.util.MD5;

import java.security.NoSuchAlgorithmException;

public class GeneratePass {
    public static String encode(String password) {


        //String key = SystemParamConfig.getSecret_key();//服务器客户端保证一致的key
        try {
            String key = MD5.getMD5Code("AA");
            return MD5.getMD5Code(Base64.encode(DES.encrypt(password.getBytes(), key)));
        } catch (Exception e) {
            e.printStackTrace();
        }
        return "";
    }

}
